package com.jiuqi.common;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2002</p>
 * <p>Company: </p>
 * @author
 * @version 1.0
 */

public class ReturnObject implements java.io.Serializable
{
  private boolean hasError = false;
  private int errorCode = 0;
  private String errorMessage = "";
  public ReturnObject(){
    super();
  }
  public ReturnObject(Exception ex){
    super();
    errorMessage = ex.getMessage();
    hasError = true;
    ex.printStackTrace();
  }
  public Boolean getHasError()
  {
    return new Boolean(this.hasError);
  }

  public Integer getErrorCode()
  {
    return new Integer(this.errorCode);
  }

  public String getErrorMessage()
  {
    return this.errorMessage;
  }

  public boolean errored(){
    return this.hasError;
  }

  public int errorcode(){
    return this.errorCode;
  }

  public String errorMsg(){
    return this.errorMessage;
  }

  public void setHasError(Boolean newHasError)
  {
    this.hasError = newHasError.booleanValue();
  }

  public void setErrorCode(Integer newErrorCode)
  {
    this.errorCode = newErrorCode.intValue();
  }

  public void setErrorMessage(String newErrorMessage)
  {
    this.errorMessage = newErrorMessage;
  }

  public void SetErrored(boolean value){
    this.hasError = value;
  }

  public void SetErrorCode(int value){
    this.errorCode = value;
  }

  public static void main(String[] args) {
  }
}